﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Configuration;

namespace BluePortal.Encoding.Core.Configuration
{
    public class StreamServiceSection : ConfigurationSection
    {
        // Fields
        private static readonly ConfigurationProperty _propStreamServicSettings = new ConfigurationProperty(null, typeof(StreamServiceSettingsCollection), null, ConfigurationPropertyOptions.IsDefaultCollection);
        private static ConfigurationPropertyCollection _properties = new ConfigurationPropertyCollection();

        // Methods
        static StreamServiceSection()
        {
            _properties.Add(_propStreamServicSettings);
        }

        protected override object GetRuntimeObject()
        {
            this.SetReadOnly();
            return this;
        }

        // Properties
        [ConfigurationProperty("", Options = ConfigurationPropertyOptions.IsDefaultCollection)]
        public StreamServiceSettingsCollection StreamService
        {
            get
            {
                return (StreamServiceSettingsCollection)base[_propStreamServicSettings];
            }
        }

        protected override ConfigurationPropertyCollection Properties
        {
            get
            {
                return _properties;
            }
        }
    }
}
